#pragma once
#include "mskwindow.h"

class CMSK1WindowApplication : 
	public CMSK1Window,
	public IMSK1WindowApplication
{
public:
	CMSK1WindowApplication(CMSK1Framework* pFramework);
	virtual ~CMSK1WindowApplication(void);

	// IUnknown Methods
	STDMETHOD_(ULONG, AddRef());
	STDMETHOD_(ULONG, Release());
	STDMETHOD(QueryInterface)(
		REFIID   riid,
		LPVOID * ppvObj
		);

	// CMSK1Window Methods
	STDMETHOD_(int,	OnCreate(
		LPCREATESTRUCT lpCreateStruct
		));

	STDMETHOD_(void, OnNcCalcSize(
		BOOL bCalcValidRects, 
		NCCALCSIZE_PARAMS* lpncsp
		));

	STDMETHOD_(LRESULT, 
		OnNcHitTest(
		POINT pt
		));

	STDMETHOD_(void, 
		OnNcLButtonDblClk(
		UINT nHitTest,
		LPPOINTS pts
		));

	STDMETHOD_(void, 
		OnActivateApp(
		BOOL bActive,
		DWORD dwThreadID
		));

	STDMETHOD_(void, OnNcPaint(
		HRGN hRgn
		));

	STDMETHOD_(void, OnMove(
		int x, 
		int y
		));

	STDMETHOD_(void, OnPaint(
		const PAINTSTRUCT &ps
		));

	STDMETHOD_(void, OnGetMinMaxInfo(
		MINMAXINFO* lpMMI
		));

	STDMETHOD_(void, OnSize(
		UINT nType, 
		int cx, 
		int cy
		));

	STDMETHOD(OnCreateDeviceIndependentResources)();

	STDMETHOD(OnCreateDeviceResources)();

	STDMETHOD_(void, OnDiscardDeviceResources());

	// IMSK1WindowApplication Methods
	STDMETHOD(CreateStatusBar)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_STATUSBAR_STYLE sbarStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1StatusBarCtrl** ppStatusbarCtrl
		);

	STDMETHOD(CreateScrollBar)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_SCROLLBAR_STYLE sbStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ScrollBarCtrl** ppScrollbarCtrl
		);

	STDMETHOD(CreateProgressBar)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_PROGRESSBAR_STYLE pbStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ProgressBarCtrl** ppProgressBarCtrl
		);

	STDMETHOD(CreateReBar)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_REBAR_STYLE rbStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ReBarCtrl** ppReBarCtrl
		);

	STDMETHOD(CreateToolBar)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_TOOLBAR_STYLE tbStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ToolBarCtrl** ppToolBarCtrl
		);

	STDMETHOD(CreateTextBox)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_TEXTBOX_STYLE eStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1TextBoxCtrl** ppTextBoxCtrl
		);

	STDMETHOD(CreateListBox)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_LISTBOX_STYLE lbStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ListBoxCtrl** ppListBoxCtrl
		);

	STDMETHOD(CreateComboBox)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_COMBOBOX_STYLE cbStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ComboBoxCtrl** ppComboBoxCtrl
		);

	STDMETHOD(CreateRichTextBox)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_RICHEDIT_STYLE reStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1RichTextBoxCtrl** ppRichTextBoxCtrl
		);

	STDMETHOD(CreateTabView)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_TAB_STYLE reStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1TabViewCtrl** ppTabViewCtrl
		);

	STDMETHOD(CreateTreeView)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_TREEVIEW_STYLE tvStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1TreeViewCtrl** ppTreeViewCtrl
		);

	STDMETHOD(CreatePropertySheetDialog)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		IMSK1PropertySheetDialog** ppPropertySheetDialog
		);

	STDMETHOD(CreateTaskDialog)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		IMSK1TaskDialog** ppTaskDialog
		);

	STDMETHOD(CreateDateTimePicker)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_DATETIME_STYLE dtStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1DateTimePickerCtrl** ppDateTimePickerCtrl
		);

	STDMETHOD(CreateHeader)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_HEADER_STYLE hdStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1HeaderCtrl** ppHeaderCtrl
		);

	STDMETHOD(CreateAnimation)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_ANIMATION_STYLE aniStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1AnimationCtrl** ppAnimationCtrl
		);

	STDMETHOD(CreateUpDown)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_UPDOWN_STYLE udStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1UpDownCtrl** ppUpDownCtrl
		);

	STDMETHOD(CreateButton)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_BUTTON_STYLE btnStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ButtonCtrl** ppButtonCtrl
		);

	STDMETHOD(CreateMonthCalendar)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_MONTHCALENDAR_STYLE mcStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1MonthCalendarCtrl** ppMonthCalendarCtrl
		);

	STDMETHOD(CreateToolTip)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_TOOLTIP_STYLE ttStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1ToolTipCtrl** ppToolTipCtrl
		);

	STDMETHOD(CreateHotKey)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		IMSK1HotKeyCtrl** ppHotKeyCtrl
		);

	STDMETHOD(CreateImageList)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		IMSK1ImageListCtrl** ppImageListCtrl
		);

	STDMETHOD(CreatePager)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_PAGER_STYLE pgrStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1PagerCtrl** ppPagerCtrl
		);

	STDMETHOD(CreateStatic)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1StaticCtrl** ppStaticCtrl
		);

	STDMETHOD(CreateSysLink)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		IMSK1SysLinkCtrl** ppSysLinkCtrl
		);

	STDMETHOD(CreateTrackBar)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_TRACKBAR_STYLE tkbStyle,
		MSK1_WINDOWPLACEMENT_FLAGS dockType,
		IMSK1TrackBarCtrl** ppTrackBarCtrl
		);

	STDMETHOD(CreateToolWindow)(
		MSK1_POINT_U position,
		MSK1_SIZE_U size,
		MSK1_WINDOWPLACEMENT_FLAGS wpFlags,
		IMSK1ToolWindow** ppToolWindowCtrl
		);
};